/*******************************************************************************
filename      CVectorHelpers.cpp
author        Craig Williams

Brief Description:
  Wrapper around the alloc functions, so that stdlib will not be included by
    the templates.
*******************************************************************************/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>

void *CVectorMalloc(int size)
{
  return malloc(size);
}

void *CVectorRealloc(void *ptr, int size)
{
  if(!ptr)
    return malloc(size);
  return realloc(ptr, size);
}

void CVectorFree(void *ptr)
{
  if(ptr)
    free(ptr);
}

void CVectorMemcpy(void *dest, void *src, int size)
{
  memcpy(dest, src, size);
}

void CVectorMemmove(void *dest, void *src, int size)
{
  memmove(dest, src, size);
}

void CVectorMemset(void *dest, int val,   int size)
{
  memset(dest, val, size);
}
